-- GENERATED SPELL FOR [Illidari Taskmaster] --


function spell0_17058(pUnit, Event) --@Demoralizing Shout,Self--
pUnit:FullCastSpellOnTarget(16244,pUnit)
pUnit:RegisterEvent('Sorts_17058', 30259, 1)
end

function spell1_17058(pUnit, Event) --@Haste Other,Self--
pUnit:FullCastSpellOnTarget(34186,pUnit)
pUnit:RegisterEvent('Sorts_17058', 10291, 1)
end

function Sorts_17058(pUnit, Event)
local choix_sorts_17058 = math.random(0, 1)
if choix_sorts_17058 == 0 then
pUnit:RegisterEvent('spell0_17058', 1, 1)
end
if choix_sorts_17058 == 1 then
pUnit:RegisterEvent('spell1_17058', 1, 1)
end
end

function mob17058_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_17058', math.random(1500, 3000), 1)
end

function mob17058_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17058_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17058_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(17058, 1, 'mob17058_Action')
RegisterUnitEvent(17058, 2, 'mob17058_Leave')
RegisterUnitEvent(17058, 3, 'mob17058_Kill')
RegisterUnitEvent(17058, 4, 'mob17058_Die')
